<template>
  <div>
    <router-view />
    <playController></playController>
  </div>
</template>


<script setup>
import playController from '@/components/playController.vue'
import { onMounted } from '@vue/runtime-core'
import { useStore } from 'vuex'

const store = useStore()

onMounted(() => {
  // 每次渲染完之后，从本地获取用户信息
  const userData = JSON.parse(localStorage.userData)
  // console.log(userData);
  store.commit('setUser', userData)
})

</script>


<style lang="less">
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: '微软雅黑';
}
.icon {
  width: 0.30rem;
  height: 0.30rem;
}
a {
  text-decoration: none;
}
body {
  background-color: #f7f7f7;;
}
</style>
